// --------------------------------------------------------------------------------------------------------------------
// <copyright file="UIDefaults.cs" company="Open Trader">
//   Copyright (c) David Denis (david.denis@systemathics.com)
// </copyright>
// <summary>
//   |  Open Trader - The Open Source Systematic Trading Platform
//   |
//   |  This program is free software: you can redistribute it and/or modify
//   |  it under the terms of the GNU General Public License as published by
//   |  the Free Software Foundation, either version 2 of the License, or
//   |  (at your option) any later version.
//   |
//   |  This program is distributed in the hope that it will be useful,
//   |  but WITHOUT ANY WARRANTY; without even the implied warranty of
//   |  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   |  GNU General Public License for more details.
//   |
//   |  You should have received a copy of the GNU General Public License
//   |  along with this program.  If not, see http://www.gnu.org/licenses
//   |
//   |  Up to date informations about Open Trader can be found at :
//   |    http://opentrader.org
//   |    http://opentrader.codeplex.com
//   |
//   |  For professional services, please visit us at :
//   |    http://www.systemathics.com
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Org.OpenTrader.Framework.UI.Forms
{
    #region Using Directives

    using System.ComponentModel;
    using System.Drawing;

    using Org.OpenTrader.Framework.LiveObjects;

    #endregion

    /// <summary>
    /// The ui defaults.
    /// </summary>
    public class UIDefaults
    {
        ////public static Color TitleBarBackColor = Color.FromArgb(255, 255, 255, 255); // SystemColors.GradientActiveCaption;
        ////public static Color TitleBarForeColor = Color.FromArgb(255, 72, 129, 224); // SystemColors.GradientActiveCaption;    
        ////public static Font TitleFont = new Font("Arial", 14F, FontStyle.Bold, GraphicsUnit.Point, ((0)));

        #region Constants and Fields

        /// <summary>
        /// The back ground.
        /// </summary>
        public static readonly Color BackGround = Color.FromArgb(200, 255, 222, 255);

        /// <summary>
        /// The back ground hilight.
        /// </summary>
        public static readonly Color BackGroundHilight = Color.FromArgb(100, 255, 0, 255);

        /// <summary>
        /// The font.
        /// </summary>
        public static readonly Font Font = new Font("Microsoft Sans Serif", 10F, FontStyle.Regular, GraphicsUnit.Point, 0);

        /// <summary>
        /// The fore ground.
        /// </summary>
        public static readonly Color ForeGround = Color.Black;

        /// <summary>
        /// The grid cell background.
        /// </summary>
        public static readonly Color GridCellBackground = Color.White;

        /// <summary>
        /// The grid cell blink background.
        /// </summary>
        public static readonly Color GridCellBlinkBackground = Color.Thistle;

        /// <summary>
        /// The grid cell font.
        /// </summary>
        public static readonly Font GridCellFont = new Font("Microsoft Sans Serif", 8F, FontStyle.Regular, GraphicsUnit.Point, 0);

        /// <summary>
        /// The grid cell foreground.
        /// </summary>
        public static readonly Color GridCellForeground = Color.Black;

        /// <summary>
        /// The grid header background.
        /// </summary>
        public static readonly Color GridHeaderBackground = SystemColors.Control;

        /// <summary>
        /// The grid header font.
        /// </summary>
        public static readonly Font GridHeaderFont = new Font("Lucida Handwriting", 8F, FontStyle.Regular, GraphicsUnit.Point, 0);

        /// <summary>
        /// The grid header foreground.
        /// </summary>
        public static readonly Color GridHeaderForeground = Color.Black;

        /// <summary>
        /// The title bar back color.
        /// </summary>
        public static readonly Color TitleBarBackColor = SystemColors.GradientActiveCaption;

        /// <summary>
        /// The title bar fore color.
        /// </summary>
        public static readonly Color TitleBarForeColor = Color.Black;

        /// <summary>
        /// The title font.
        /// </summary>
        public static readonly Font TitleFont = new Font("Lucida Handwriting", 12F, FontStyle.Regular, GraphicsUnit.Point, 0);

        #endregion

        #region Constructors and Destructors

        /// <summary>
        /// Initializes static members of the <see cref="UIDefaults"/> class.
        /// </summary>
        static UIDefaults()
        {
            var tdpbool = new BoolConfigurationFieldTypeDescriptionProvider();
            TypeDescriptor.AddProvider(tdpbool, typeof(ConfigurationField.Bool));

            var tdpdecintstring = new ConfigurationFieldTypeDescriptionProvider();
            TypeDescriptor.AddProvider(tdpdecintstring, typeof(ConfigurationField.Decimal));
            TypeDescriptor.AddProvider(tdpdecintstring, typeof(ConfigurationField.Int));
            TypeDescriptor.AddProvider(tdpdecintstring, typeof(ConfigurationField.String));

            var tdpenum = new EnumConfigurationFieldTypeDescriptionProvider();
            TypeDescriptor.AddProvider(tdpenum, typeof(ConfigurationField.Enum));

            var tdpfiletable = new BinaryConfigurationFieldTypeDescriptionProvider();
            TypeDescriptor.AddProvider(tdpfiletable, typeof(ConfigurationField.File));
            TypeDescriptor.AddProvider(tdpfiletable, typeof(ConfigurationField.Table));
        }

        #endregion
    }
}